#ifndef __USER_SET_H__
#define __USER_SET_H__

#include	"SN32F280.h"
#include	"SN32F200_Def.h"

/************************************************************
;SYSTEM MODE
************************************************************/
#define			BT_MODE_EN					1
#define			LED_API_EN					1

#define			BT_ITON							1
#define			BT_HTX							2
#define			BT_MODULE						BT_HTX
/************************************************************
;USB or OS define
************************************************************/
#define			OS_WIN							0										//Only Windows OS
#define			OS_MAC							1										//Include MAC OS Function,FN send scan code
#define			OS_IOS							2
#define			OS_ANDR							3

#define			OS_TYPE							OS_MAC

#define			USB_VID							0x05AC							//Description	: USB_VID
#define			USB_PID							0x024F							//Description	: USB_PID
#define			USB_REV							0x0111							//Description	: USB_REV
/************************************************************/

/************************************************************
;KB define
************************************************************/
#define			KEY_DEBOUNCE				5										//debounce time about 12ms@PWM/48

/************************************************************
;LED define
************************************************************/
#define			OLED_EN							1
#define			SLED_EN							0

#define			LED_COL_NUM					19
//#define	 		LED_MODE6_TAB_LEN  	32

#define			LED_INDIC_EN				1

#if LED_INDIC_EN
	#define		LED_NUM_OUTPUT		SN_GPIO3->MODE_b.MODE5 = 1;
	#define		LED_CAP_OUTPUT		SN_GPIO1->MODE_b.MODE9 = 1;
//	#define		LED_SCR_OUTPUT		SN_GPIO3->MODE_b.MODE15 = 1;
	#define		LED_WIN_OUTPUT		SN_GPIO3->MODE_b.MODE6 = 1;

	#define		LED_NUM_ON				SN_GPIO3->BSET_b.BSET5 = 1;
	#define		LED_CAP_ON				SN_GPIO1->BSET_b.BSET9 = 1;
//	#define		LED_SCR_ON				SN_GPIO3->BSET_b.BSET15 = 1;
	#define		LED_WIN_ON				SN_GPIO3->BSET_b.BSET6 = 1;
	
	#define		LED_NUM_OFF				SN_GPIO3->BCLR_b.BCLR5 = 1;
	#define		LED_CAP_OFF				SN_GPIO1->BCLR_b.BCLR9 = 1;
//	#define		LED_SCR_OFF				SN_GPIO3->BCLR_b.BCLR15 = 1;
	#define		LED_WIN_OFF				SN_GPIO3->BCLR_b.BCLR6 = 1;
#endif 
/************************************************************
;LCD define
************************************************************/

/************************************************************
;Others define
************************************************************/
#define		WHEEL_EN							1
#if WHEEL_EN
	#define		Wheel1_B					 (SN_GPIO0->DATA_b.DATA10)
	#define		Wheel1_A					 (SN_GPIO1->DATA_b.DATA2)
#endif


#define	SKEY_EN									1
#if SKEY_EN
	#define		MAC_Status			(SN_GPIO1->DATA_b.DATA1)
	#define		BT_Status				(SN_GPIO1->DATA_b.DATA12)
	#define		RF_Status			  (SN_GPIO1->DATA_b.DATA13)
#endif

#define	CHR_EN									1
#if	CHR_EN
	#define			USBLINK_Status	(SN_GPIO1->DATA_b.DATA17)
	#define			CHARGE_Status		(SN_GPIO1->DATA_b.DATA16)
#endif

#define		SCL_OUTPUT				SN_GPIO0->MODE_b.MODE14 = 1
#define		SCL_HIGH					SN_GPIO0->BSET_b.BSET14 = 1 
#define		SCL_LOW						SN_GPIO0->BCLR_b.BCLR14 = 1 
#define		SDA_HIGH					SN_GPIO0->BSET_b.BSET15 = 1 
#define		SDA_LOW						SN_GPIO0->BCLR_b.BCLR15 = 1 
#define		SDA_INPUT					SN_GPIO0->MODE_b.MODE15 = 0
#define		SDA_OUTPUT				SN_GPIO0->MODE_b.MODE15 = 1
#define		SDA_STATUS				SN_GPIO0->DATA_b.DATA15
	
#endif
